<?php

namespace App\Http\Requests\Api;

class RoleRequest extends FormRequest
{
    public function rules()
    {
        return [
            'name' => 'required|string|min:2'
        ];
    }

    public function attributes()
    {
        return [
            'name' => '角色名称'
        ];
    }

    public function messages()
    {
        return [
            'name.min' => '角色名最小为2个字符之间。',
            'name.required' => '角色名不能为空。',
        ];
    }
}
